import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "../views/HomeView.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "home",
    component: HomeView
  },
  {
    path: "/china",
    name: "china",
    component: () =>
      import(/* webpackChunkName: "china" */ "../views/Map/china.vue")
  },
  {
    path: "/province",
    name: "province",
    component: () =>
      import(/* webpackChunkName: "province" */ "../views/Map/province.vue")
  },
  {
    path: "/city",
    name: "city",
    component: () =>
      import(/* webpackChunkName: "city" */ "../views/Map/city.vue")
  },
  {
    path: "/imgCheck",
    name: "imgCheck",
    component: () =>
      import(/* webpackChunkName: "imgCheck" */ "../views/imgCheck/index.vue")
  },
  {
    path: "/desensitizeInput",
    name: "desensitizeInput",
    component: () =>
      import(
        /* webpackChunkName: "desensitizeInput" */ "../views/desensitizeInput/index.vue"
      )
  },
  {
    path: "/echartScroll",
    name: "echartScroll",
    component: () =>
      import(
        /* webpackChunkName: "echartScroll" */ "../views/echartScroll/index.vue"
      )
  },
  {
    path: "/imgCut",
    name: "imgCut",
    component: () =>
      import(/* webpackChunkName: "imgCut" */ "../views/imgCut/index.vue")
  }
];

const router = new VueRouter({
  mode: "hash",
  base: process.env.BASE_URL,
  routes
});

export default router;
